package ru.stepuk.modern.distributions;

import ru.stepuk.modern.Model;
import ru.stepuk.modern.generators.RandomNumberGenerator;

/**
 *
 * @author ivan
 */
public class DistributionFactory {

    private Model model;

    public DistributionFactory(Model model) {
        this.model = model;
    }

    public Distribution createExponential() {
        return new ExponentialDistribution(model.getGenerator(), 1);
    }

    public Distribution createErlang() {
        return new ErlangDistribution(model.getGenerator(), 1, 1);
    }

    public Distribution createDegenerate() {
        return new DegenerateDistribution(1);
    }

    public Distribution createUniform() {
        return new UniformDistribution(model.getGenerator(), 1, 2);
    }

    public Distribution createDiscrete() {
        return new DiscreteDistribution(model.getGenerator(), new int[]{100}, new double[]{1});
    }
}
